All Functions Used So Far, Week 2

setwd

{base}

Set Working Directory

str

{utils}

Get the structure of an R object

mutate

{dplyr}

Create new variables

install.packages

{utils}

Install R packages

filter

{dplyr}

Filter out rows of a data frame according to logical vector

max

{base}

Get maximum of a vector

ordered

{dplyr}

Create an ordered factor

names

{base}

Get or set names of an object

library

{base}

Load an R package

head

{utils}

Show first 5 rows of a data frame

is.na

{base}

Check if a value is NA/elements of vector are NA

var

{stats}

Calculate variance

sd

{stats}

Get standard deviation of a vector

nobs

{stats}

Return the number of observations in a model object

cut

{base}

Convert Numeric to Factor

min

{base}

Get minimum of a vector

range

{base}

Return range of values

mean

{base}

Get mean of a vector

length

{base}

Returns number of elements in an object

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

c

{base}

Combine values/vectors into a vector

read_excel

{readxl}

Read an Excel file

lm

{stats}

Fit linear models using least squares

View

{base}

View a data frame

summary

{base}

Obtain summary statistics or detailed regression output

median

{stats}

Get median of a vector

The end!